CC=gcc
SILENT=-s

all : main.c
	@echo A compilar todas as dependências
	@cd base; make all $(SILENT)
	@cd io/logs; make all $(SILENT)
	@cd data; make all $(SILENT)
	@cd util/lists; make all $(SILENT)
	@cd util/hashs; make all $(SILENT)
	@cd util/graphs; make all $(SILENT)
	@cd util/graphs/coloring; make all $(SILENT)
	@cd io/files/uces; make all $(SILENT)
	@cd io/files/students; make all $(SILENT)
	@cd io/files/config; make all $(SILENT)
	@cd io/cmd; make all $(SILENT)
	@cd business/project; make all $(SILENT)
	@cd business/data; make all $(SILENT)
	@cd business/util; make all $(SILENT)
	@cd business/allocation; make all $(SILENT)
	gcc main.c -o main io/logs/logSystem.o data/uce/uce.o data/student/student.o util/lists/linked-list.o util/hashs/hash.o util/hashs/hashFunctions.o util/hashs/chainingHashMap.o util/graphs/graph.o util/graphs/coloring/graphColoring.o io/files/uces/lex.uces.o io/files/uces/uces.tab.o io/files/students/lex.students.o io/files/students/st.tab.o io/cmd/lex.read.o util/lists/array-list.o io/cmd/cmd.o business/project/project.o business/data/students.o business/util/util.o business/data/uces.o util/lists/queue.o io/files/config/config.o business/allocation/allocation.o data/store/store.o data/store/variables.o -lm -lreadline -g

clean : 
	@echo "Limpeza!"
	@cd base; make clean $(SILENT)
	@cd io/logs; make clean $(SILENT)
	@cd data; make clean $(SILENT)
	@cd util/lists; make clean $(SILENT)
	@cd util/hashs; make clean $(SILENT)
	@cd util/graphs; make clean $(SILENT)
	@cd util/graphs/coloring; make clean $(SILENT)
	@cd io/files/uces; make clean $(SILENT)
	@cd io/files/students; make clean $(SILENT)
	@cd io/files/config; make clean $(SITLET)
	@cd io/cmd; make clean $(SILENT)
	@cd business/project; make clean $(SILENT)
	@cd business/data; make clean $(SILENT)
	@cd business/util; make clean $(SILENT)
	@cd business/allocation; make clean $(SILENT)
	rm -f main
